using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.Collections.Specialized;

namespace Axe.Logging
{
    public class EventSinkElement : ConfigurationElement
    {
        #region public string Name
        [ConfigurationProperty("name", IsRequired = true)]
        public string Name
        {
            get
            {
                return (string)base["name"];
            }
            set
            {
                base["name"] = value;
            }
        }
        #endregion

        #region public string Type
        [ConfigurationProperty("type", IsRequired = true)]
        public string Type
        {
            get
            {
                return (string)base["type"];
            }
            set
            {
                base["type"] = value;
            }
        }
        #endregion

        NameValueCollection m_Attributes = new NameValueCollection();

        protected override bool OnDeserializeUnrecognizedAttribute(string name, string value)
        {
            m_Attributes.Add(name, value);
            return true;
        }

        public NameValueCollection Attributes
        {
            get
            {
                return m_Attributes;
            }
        }
        
    };
}
